function once(fn){
  let done = false;
  return function (){
    if(!done){
      done = true
      return fn.apply(this,arguments)
    }
  };
}
const pay = once(function(money){
  console.log("支付了"+money+"RMB")
})

pay(5)
pay(5)
pay(5)
const pay2 = once(function (money){
  console.log("支付了"+money+"RMB")
})
pay2(7)
pay2(7)
pay2(7)